<template>
	<view class="title-page">
		<view class="title-item">
			<view class="iconfont icon-wancheng" v-if="isIcon"></view>
			<view class="title">{{name}}</view>
		</view>
		<view class="info-content">
			<slot></slot>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'Card',
		props: {
			isIcon: {
				type: Boolean,
				default: false,
			},
			name: {
				type: String,
				default: 'name'
			},
		},
		watch: {

		},
		methods: {

		},
		data() {
			return {}
		},
	}
</script>

<style lang="scss" scoped>
	.title-page {
		background: #fff;
		border-radius: 30rpx;

		.title-item {
			width: 100%;
			height: 90rpx;
			background: url('https://suzhouqu-static-1306862033.cos.ap-chengdu.myqcloud.com/suzhouHousesLease/uniapp/rent/title_bg.png')no-repeat top;
			background-size: 100% 100%;
			border-radius: 30rpx 30rpx 0 0;
			display: flex;
			align-items: center;
			padding: 0 30rpx;

			.iconfont {
				font-size: 34rpx;
				color: $theme-color;
				margin-right: 20rpx;
			}

			.title {
				font-size: 34rpx;
				font-weight: bold;
				color: $theme-color;
			}
		}

		.info-content {
			padding: 30rpx;
		}
	}
</style>